// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TaxCalculationRule generated by hbm2java
 */
@Entity
@Table(name = "tax_calculation_rule", catalog = "magento")
public class TaxCalculationRule implements java.io.Serializable {
	private static final long serialVersionUID = 121323L;

	private Integer taxCalculationRuleId;
	private String code;
	private int priority;
	private int position;
	private Set taxCalculations = new HashSet(0);

	public TaxCalculationRule() {
	}

	public TaxCalculationRule(String code, int priority, int position) {
		this.code = code;
		this.priority = priority;
		this.position = position;
	}

	public TaxCalculationRule(String code, int priority, int position,
			Set taxCalculations) {
		this.code = code;
		this.priority = priority;
		this.position = position;
		this.taxCalculations = taxCalculations;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "tax_calculation_rule_id", unique = true, nullable = false)
	public Integer getTaxCalculationRuleId() {
		return this.taxCalculationRuleId;
	}

	public void setTaxCalculationRuleId(Integer taxCalculationRuleId) {
		this.taxCalculationRuleId = taxCalculationRuleId;
	}

	@Column(name = "code", nullable = false)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "priority", nullable = false)
	public int getPriority() {
		return this.priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	@Column(name = "position", nullable = false)
	public int getPosition() {
		return this.position;
	}

	public void setPosition(int position) {
		this.position = position;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "taxCalculationRule")
	public Set getTaxCalculations() {
		return this.taxCalculations;
	}

	public void setTaxCalculations(Set taxCalculations) {
		this.taxCalculations = taxCalculations;
	}

}
